import { BasePagesResponseData, BaseResponseData } from "@renderer/interface/baseData";
import { TaskItem, TaskSearchForm } from "@renderer/interface/task";
import http from "@renderer/utils/request";

/**
 * 获取任务分页列表
 * @param data 任务搜索表单
 * @returns 任务分页列表
 */
export const getTaskPageApi = (data: TaskSearchForm) =>
	http.get<BasePagesResponseData<TaskItem>>('/crm/task/page', data)

/**
 * 删除某一任务
 * @param id 任务id
 * @returns 
 */
export const getTaskDelApi = (id: string) =>
	http.get<BaseResponseData<string>>(`/crm/task/delete/${id}`)